/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.qp.smsmarketing.utils.report;

import com.itextpdf.text.Document;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfWriter;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.List;

/**
 *
 * @author waldenilson
 */
public class ReportPDF {

    public void criarSimplesPDF(String nomeDoc,String path,String titulo,List<String> listaParagrafo)
    {
        Document docPdf = new Document(PageSize.A4,72,72,72,72);
        OutputStream os = null;
        try {
            os = new FileOutputStream(path+nomeDoc+".pdf");
            PdfWriter.getInstance(docPdf, os);
            docPdf.open();
            Paragraph p = new Paragraph(titulo);
            docPdf.add(p);

            if(docPdf != null)
                docPdf.close();
            if(os != null)
                os.close();

        } catch (Exception ex) {
            
        }

    }

}
